#ifndef _ITEM_TELEPORT_H_
#define _ITEM_TELEPORT_H_

//---------------------------------------------------------------------------
#include "../../RPGItem.h"
//---------------------------------------------------------------------------

class Item_Teleport : public RPGItem
{
private:

public:

	Item_Teleport()
	{
		// cargo el sprite del personaje
		LoadIni("./data/items/teleport.spr");
		SetGUISprite("./data/items/teleport.spr", 1.0f);
	}

	void Use(RPGCharacter *pCharacter)
	{
		float x = (rand()%(int)(g_renderer.GetViewPortWidth()))-(int)(g_renderer.GetViewPortWidth()/2);
		float y = (rand()%(int)(g_renderer.GetViewPortHeight()))-(int)(g_renderer.GetViewPortHeight()/2);
		x+=pCharacter->GetPosX();
		y+=pCharacter->GetPosY();
		pCharacter->SetPos(x,y);
	}
};


#endif //_ITEM_TELEPORT_H_